<div draggable mat-dialog-title>
  <h6>{{"editPhospital" | translate}} - {{person.personName}}</h6>
</div>

<div mat-dialog-content class="wdl-dialog-content">
  <form [formGroup]="hospitalForm" class="form-container" novalidate autocomplete="off">
    <mat-grid-list cols="3" rowHeight="70px" gutterSize="10">
      <mat-grid-tile colspan="1">
        <mat-form-field>
          <mat-select formControlName="nurse" placeholder="{{'majorNurse' | translate}}">
            <mat-option *ngFor="let nurse of nurses" [value]="nurse.id">{{nurse.nurseName}}</mat-option>
          </mat-select>
        </mat-form-field>
      </mat-grid-tile>

      <mat-grid-tile colspan="1">
        <mat-form-field>
          <input formControlName="checkinTime" matInput placeholder="{{'checkinTime' | translate}}">
        </mat-form-field>
      </mat-grid-tile>

      <mat-grid-tile colspan="1">
        <mat-form-field>
          <input formControlName="checkoutTime" matInput placeholder="{{'checkoutTime' | translate}}">
        </mat-form-field>
      </mat-grid-tile>

      <mat-grid-tile colspan="3">
        <mat-form-field>
          <input formControlName="checkinRecord" matInput placeholder="{{'checkinRecord' | translate}}">
        </mat-form-field>
      </mat-grid-tile>

      <mat-grid-tile colspan="3">
        <app-bselection style="width: 100%;" [readonly]="readonly" [bedId]="bedId" [unique]="true" (change)="bedSelectionChange($event)"></app-bselection>
      </mat-grid-tile>

      <mat-grid-tile colspan="3">
        <mat-form-field>
          <input formControlName="checkoutRecord" matInput placeholder="{{'checkoutRecord' | translate}}">
        </mat-form-field>
      </mat-grid-tile>
    </mat-grid-list>
  </form>
</div>

<div mat-dialog-actions>
  <button mat-button (click)="dialogRef.close('Close')">{{'close' | translate}}</button>
  <button mat-button (click)="submit()" [disabled]="!hospitalForm.dirty">{{'submit' | translate}}</button>
</div>
